package com.qilu.pe.base;

import android.text.TextUtils;

public class BaseResult2<B> {
    private String code;
    private String msg;
    private B data;

    public boolean isSuccess() {
        return TextUtils.equals("1", code);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public B getData() {
        return data;
    }

    public void setData(B data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "BaseResult2{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
